package center.wxp.mapper.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import tk.mybatis.template.annotation.ParamCondition;

import javax.persistence.Column;
import java.util.Date;

/**
 * @author wuxiaopeng
 */
@Data
public class UserListAnnotationDto {
    @ApiModelProperty(value = "主键IDS")
    @ParamCondition(pattern = "in",entityName = "id")
    private String[] ids;

    @ApiModelProperty(value = "姓名")
    @ParamCondition(pattern = "like",fuzzyPosition = "all")
    private String name;

    @ApiModelProperty(value = "年龄")
    @ParamCondition(order = "order",orderType = "desc")
    private Integer age;

    @ApiModelProperty(value = "开始创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ParamCondition(pattern = ">=",entityName = "createDate")
    private Date beginCreateDate;

    @ApiModelProperty(value = "结束创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ParamCondition(pattern = "<=", entityName = "createDate")
    private Date endCreateDate;
}